package cn.jichangxiu.ucenter.service.impl;

import cn.jichangxiu.common.ucenter.entity.Role;
import cn.jichangxiu.ucenter.mapper.RoleMapper;
import cn.jichangxiu.ucenter.service.inte.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> getRolesByUserId(String userId) {
        List<Role> roles = new ArrayList<>();
        try {
            roles = roleMapper.findRolesByUserId(userId);
        }catch (Exception e){

        }
        return roles;
    }

}
